<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>微电影管理系统</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="{{ url_for('static',filename='base/images/logo.png')}}">
    <link rel="stylesheet" href="{{ url_for('static',filename='admin/bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{ url_for('static',filename='fonts/css/font-awesome.min.css')}}">
    <link rel="stylesheet" href="{{ url_for('static',filename='ionicons/css/ionicons.min.css')}}">
    <link rel="stylesheet" href="{{ url_for('static',filename='admin/dist/css/AdminLTE.min.css')}}">
    <link rel="stylesheet" href="{{ url_for('static',filename='admin/plugins/iCheck/square/blue.css')}}">
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href=""><b>微电影管理系统</b></a>
    </div>
    <div class="login-box-body">
        {% with messages = get_flashed_messages(category_filter=["err"]) %}
            {% for message in messages %}
                {% if message %}
                 <p class="login-box-msg"  style="color:red">
                     {{message}}
                 </p>
                {% endif %}
            {% endfor %}
        {% endwith %}
        {% with messages = get_flashed_messages(category_filter=["ok"]) %}
            {% for message in messages %}
                {% if message %}
                 <p class="login-box-msg"  style="color:green">
                     {{message}}
                 </p>
                {% endif %}
            {% endfor %}
        {% endwith %}

        <form action="" method="post" id="form-data">
            <div class="form-group has-feedback">
                <input name="name" type="text" class="form-control" placeholder="请输入账号！"
                       value="{{form.data['name']|default('',True)}}">
                <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
                {% for err in form.name.errors %}
                <div class="col-md-12">
                    <span style="color:red">{{ err }}</span>
                </div>
                {% endfor %}
            </div>
            <div class="form-group has-feedback">
                <input name="pwd" type="password" class="form-control" placeholder="请输入密码！">
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                {% for err in form.pwd.errors %}
                <div class="col-md-12">
                    <span style="color:red">{{ err }}</span>
                </div>
                {% endfor %}
            </div>
            <div class="row">
                <div class="col-xs-8">
                </div>
                <div class="col-xs-4">
                    <input id="btn-sub" type="submit" class="btn btn-primary btn-block btn-flat" value="登录">
                    {{form.csrf_token}}
                </div>
            </div>
        </form>
    </div>
</div>
<script src="{{ url_for('static',filename='admin/plugins/jQuery/jQuery-2.2.0.min.js')}}"></script>
<script src="{{ url_for('static',filename='admin/bootstrap/js/bootstrap.min.js')}}"></script>
<script src="{{ url_for('static',filename='admin/plugins/iCheck/icheck.min.js')}}"></script>
</body>
</html>
